package com.usian.article.job;

import com.usian.article.service.IApHotArticlesService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
 * 计算热点文章分值的定时任务
 */
@Component
@Slf4j
public class ComputeHotArticleJob {

    @Autowired
    private IApHotArticlesService hotArticlesService;

    @XxlJob("computeHotArticleJob")
    public ReturnT<String> computeHotArticle(String param){
        log.info("计算热点文章分值的定时任务执行了。。。");
        hotArticlesService.findHotArticle();
        return ReturnT.SUCCESS;
    }
}
